<!DOCTYPE html>
<html lang="zh-cn" color-mode="light">

  <head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="keywords" content="" />
  <meta name="author" content="郁涛丶" />
  <meta name="description" content="" />
  
  
  <title>
    
      HW日记 
      
      
      |
    
     郁涛丶&#39;s Blog
  </title>

  
    <link rel="apple-touch-icon" href="/images/favicon.png">
    <link rel="icon" href="/images/favicon.png">
  

  <!-- Raleway-Font -->
  <link href="https://fonts.googleapis.com/css?family=Raleway&display=swap" rel="stylesheet">

  <!-- hexo site css -->
  
<link rel="stylesheet" href="/css/color-scheme.css">
<link rel="stylesheet" href="/css/base.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1886449_67xjft27j1l.css">
<link rel="stylesheet" href="/css/github-markdown.css">
<link rel="stylesheet" href="/css/highlight.css">
<link rel="stylesheet" href="/css/comments.css">

  <!-- 代码块风格 -->
  
    
<link rel="stylesheet" href="/css/figcaption/mac-block.css">

  

  <!-- jquery3.3.1 -->
  
    <script defer type="text/javascript" src="/plugins/jquery.min.js"></script>
  

  <!-- fancybox -->
  
    <link href="/plugins/jquery.fancybox.min.css" rel="stylesheet">
    <script defer type="text/javascript" src="/plugins/jquery.fancybox.min.js"></script>
  
  
<script src="/js/fancybox.js"></script>


  

  <script>
    var html = document.documentElement
    const colorMode = localStorage.getItem('color-mode')
    if (colorMode) {
      document.documentElement.setAttribute('color-mode', colorMode)
    }
  </script>
<!-- hexo injector head_end start -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hexo-math@4.0.0/dist/style.css">
<!-- hexo injector head_end end --><meta name="generator" content="Hexo 5.4.0"><link rel="alternate" href="/atom.xml" title="郁涛丶's Blog" type="application/atom+xml">
</head>


  <body>
    <div id="app">
      <div class="header">
  <div class="avatar">
    <a href="/">
      <!-- 头像取消懒加载，添加no-lazy -->
      
        <img src="/images/avatar.png" alt="">
      
    </a>
    <div class="nickname"><a href="/">Ghostasky</a></div>
  </div>
  <div class="navbar">
    <ul>
      
        <li class="nav-item" data-path="/">
          <a href="/">Home</a>
        </li>
      
        <li class="nav-item" data-path="/archives/">
          <a href="/archives/">Archives</a>
        </li>
      
        <li class="nav-item" data-path="/categories/">
          <a href="/categories/">Categories</a>
        </li>
      
        <li class="nav-item" data-path="/tags/">
          <a href="/tags/">Tags</a>
        </li>
      
        <li class="nav-item" data-path="/about/">
          <a href="/about/">About</a>
        </li>
      
    </ul>
  </div>
</div>


<script src="/js/activeNav.js"></script>



      <div class="flex-container">
        <!-- 文章详情页，展示文章具体内容，url形式：https://yoursite/文章标题/ -->
<!-- 同时为「标签tag」，「朋友friend」，「分类categories」，「关于about」页面的承载页面，具体展示取决于page.type -->


    <!-- LaTex Display -->

  
    <script async type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
  
  <script>
    MathJax = {
      tex: {
        inlineMath: [['$', '$'], ['\\(', '\\)']]
      }
    }
  </script>


        
            
                <!-- clipboard -->

  
    <script async type="text/javascript" src="/plugins/clipboard.min.js"></script>
  
  
<script src="/js/codeCopy.js"></script>



                    
                        
                                
                                        
                                                
                                                        
                                                            <!-- 文章内容页 url形式：https://yoursite/文章标题/ -->
                                                            <div class="container post-details" id="post-details">
                                                                <div class="post-content">
                                                                    <div class="post-title">
                                                                        HW日记
                                                                    </div>
                                                                    <div class="post-attach">
                                                                        <span class="post-pubtime">
        <i class="iconfont icon-updatetime" title="Update time"></i>
        2022-07-25
      </span>

                                                                        <span class="post-pubtime"> 本文共22字 </span>

                                                                        <span class="post-pubtime">
        大约需要1min
      </span>

                                                                        
                                                                                    <span class="post-categories">
        <i class="iconfont icon-bookmark" title="Categories"></i>
        
        <span class="span--category">
          <a href="/categories/Life/" title="Life">
            <b>#</b> Life
          </a>
        </span>
                                                                                    
                                                                                        </span>
                                                                                        
                                                                            <span class="post-tags">
        <i class="iconfont icon-tags" title="Tags"></i>
        
        <span class="span--tag">
          <a href="/tags/Life/" title="Life">
            <b>#</b> Life
          </a>
        </span>
                                                                            
                                                                                </span>
                                                                                
                                                                    </div>
                                                                    <div class="markdown-body">
                                                                        <div class="hbe hbe-container" id="hexo-blog-encrypt" data-wpm="风中传来苦咸，是悔恨的气味吗?" data-whm="抱歉, 这个文章不能被校验, 不过您还是能看看解密后的内容.">
  <script id="hbeData" type="hbeData" data-hmacdigest="dcda8d34210a2a66b79adc3b4303210bdc72d7c7906d52b857e101959534a48b">f045e053d6254bea7b0b1b710a9b6ff631a1d1b1f06fa641516db0d753f357081ba065ba90fcf1ae5642e257c32e0f50739af394efcf112a36c73d9161a9aee8846c82e50dfa17faed74f6d7ac9820527e7b7af76e2e1c8b722fe2dc31ebaa02710ea957f1ae0896b88d1fcead7981bc3a5ad61cfdb34f6caf010ac76ca2755f3d84d8f384447323dda4dabd71e78d15c93023ee14a0023e00637d64673eb81a194d7793da77db4ddb5162c1e8dc93e7d15cd65b13573ee7693240263b5a9efa77c4374eb2efe4d587098dc6f4ab3b5ecb61d4041c6d431489a89183d390445128bed279762408528bbcdee14fcd70618ac1f72c9a8d1056fb0f183a811653966e3bbca0efbb0e635919a2b256c47927704ad25ebcaf399c218305cb240c9fbedc9c487d671465bca6e67db6b43d30dc9d5fdd55ca9cd9812eee68681254094a5fd1eb19adc051870d4d8337a1a7c1f3b527102f6e2ba11a0f1544f7a331fcf78729447cc50b894b3f3bca5dc00a1b736d9e503edee32102c5d0895a3e8f92d65d2285a372ea9351ebe9e554ee74ccf5d3074330fa1efb1d9d77d686f38bcea0e0e6526233af3839875ac44972400f4343584ff15f32e46f9acec3fa47e6799ba69d6601faea99ff247a08b1074cd7f5b6e8e580019507a24781d60587e3a30bb6a81211c635447f0d401aba1aeb69cf39a081b3d9f2397ac38ecc86f2fc91964e3ec2e2aeb325f16f011065f7b267d849fe85fe199026659afdeceb03bf284c7c5751a85744641adb443c44ea10a6790bce1227645eaa8a568db2d9b0658c757ba65bdb60a46bd7178a79af19386600b0ae969e313ada35b50c6f1d154a42a6eeb006f2b19722d37263029bd32888f73eb8b804bcecf621c9acb3207f658a849676f6fcb20e17f0788de375b267d82eb597e3e0bc83ea9cc5675953b076f94c2b25c850a37dc3ccb18030d2448ecd4ad402a4540a2665f84ad80f7a940379482e3b28ad4cad3c9b846032b8149e13ddc37985c137ab80d823629bb696b54ec731ffe6cb948e29de74fc3abd7f1428f9942e1e7e92c4ee342476fee27443c5a9f3538cda43928cb61aa54cf46811777cbbf7c04b3a1e1f369b8212c2fcd46abb18546c92e1bd1b6e49351f9ed1ac0f7f79a577b460d711d45fdb86f31bd2f38c5a71088fd763ef3b850a08f5f73363c8bddecd59257cc4c4efc19ddc76d89ae45e5f4f59471883e55e385898a456b34d315f0781786dad9da52d328e186a87562c19bf8cdc6e1dce6ccda01cc8ea0ad22cced68dcc4d249114722c819218ab4c74e9404ac6b4423098524de2aaf4c779b19810501769e67a89515acd1815a412094d53d71cc7377cdec16f9352c51d32096125cfb1bc2d635ebf95d2a86f9521480d54ebe2786b3bc9c0da769848d6cd0f06effa8015879fc7fb6804ed30543312897e6af401c79bbc2a210b31d8750e13d7431b59d34dd256f7c54740b0862d43af571b1fd14bf15ce506e90cf184c72e0493eb9212679bb2a5132850ad0601d938f67896bc4eef296b9a817e977bb724876f81f44e60c1e69fcdb8c650ff01040b2354044002825fbc0a19b64e917f5de76ae094dce0d6cf99d711d142426007a6417bffea96e2690c0ae785f2b1fcc9ca44703b5c53cdefda5b8d07e4bd9b81e2e107bd4bcfef54635e058c3465fa98af6e45ab7ac6ab709a62d192c78fbe82360bd29e155a854a0591668787ce2af20035d9cee526257cf1437d17d909db182c4005af3c3bb70d448fa8b7640fe90921507e795dcc783b740d206a976aa823edab493fb6f9517901425602c08ca55c6015830dbfc4a627236189796bbe2da23af2ab2191b26a6cb181c7f08644f34ce87de3ff7c02f5f04cd3ee582280c1bb72faadec9f109cfb9b18276e636ae22273322f8112f13bba978ddbab07f4740f864ab23f199baddf4405b89050818ad9a1b822aa8cb1fa5c2e3b289f66e6cb283216be50eed61dcf76461287c0cda84d88ad319bd975e1608740d9786262f4bca16744742ed9d109d0c815bb19c008db645886d2292077d8a702706b4c1758e7721198e5e0004c3d45ca55d1091481c9c891d0a53582ecaf5392de4be39eb7c25c143a3f5348a40dc9b7218c3ddf0b81c20eaa92579f205d7c7c9494fa4afa516518108b45ab5ac4c6434e3517276e15e5de5c4765f06e4627f857466353467f94c4cb2502aa975919d448402b7d5356156c161cf4f7890360ee0fdc5f2cf50f6cd9d5686fc8dfe698c6a7455eaf0afcd3796d984c1d5cc0bc7626c17039c56416b35339b7c197630bfb253fb010bb66c74b705f5a1449ea5af09161b85e9d4aa8fe05f2865b787bfde84c9f1d99f1e46d513229c49845ec802d0efb74a4c30d2a9341be6034c1555e83fce7fb30b900a531787f6d23a854040ed5fde09264e66802f7eb7527f3d950a5911f5cff3f1a848d65a9f482d0d77ad92170340419fa88d2bd486569e477623ada7667c0c5348def6f1aac43c0a48d8e144610e5246f75f2af819d3676e99e2f7be3b8115292f41d9e8870cd4b0940fdd83182df715b82413486f6932aaa1a808aae1befa6a11157098f75f50f1766090026c8249e90c0b9961e2182efec249ccfd0498b412818952b6b9f958c1b9bdca61186e14781618986c83ced7ec682aee48a46c542a82cbc01ea7174d5799c4d5eb006520734e37007270e437c11fb18a493cdf4a38d3bfb016baef6772f7449e0edbb892cb31a4bbbac52491211766e83ed50126a0194d5c12a07dfa79b9e543e11a9c426a8373bf17ffc10d619b2ff525b1f8f53373358449ff866415f7dc6df5354e8b80e43113e932f9c862bbd2df8536ab56c3eb4df99f58fb65032b9e3fbac9fe4117bade1d9cbb80e0da2d962d1518094e6e5a239682909354245039a598cd5774e55ae4e94b7f04286a527c4c08e9241468f852f2fb51295d2375f86235b8b15eec85d3efe3eeb01a5a3b1e3e13781c53f546030a9d9a13a2483b316046e8c06dc9abbbd242233b98ae81595ad3469ae9ca2a124335b25c00138541fb7408486c2192d9d6680f459ee48e10620b25f60174fcf51ea390983a8ff63e22339e3a1ea6c57429f27f25067af67ee5b3bca6f7a30eb6c7df2588eb0b561bad2d04b3d57289880f083a4a6d921d3eeb882b54eb107d7f8a1d2af17531ff439af2120d80146f8efaaf7753d6a39d49825da0dfc2ed3201cf6d2bd677c3eb37d0f07a6e125706e59205ea73185b70de1a71372ee45ba57c9bb0e62c56be1e2bdf29965cb2d93f80f4ea843253e4cbe6eaf8881a5ea772e3667dbd9d6879e33344649c42cb6610b3310a591b7c8d4167f9eb0f2f4e7973dc51ba810139e2e8b441dbc095d9038c549429e6b6b4bd28460ac31cc609a6b13a75cee14e21424e1e202da1feb3a041caa5e752e506dce48948a7c40aa07dd097e67d604fca665aac5013333bea49d23a8cc19addb5a39f31a60c4138e42863c328827f2ef106f1bd325b793c04a4611e80a74c0104a13b3597492aae1c4def37d44b024558f8a84a8e92926a47c0e004bc239414f201dc13c86625748aba7d03bb275ca2b98489cf1e3f22119cf3840940dd3cddcd5e3e08d4e59d36ccc181bedc81cd32ae85922de588efb8dfa19f0a4e0157d5c5306570742b5f0b768f70b796b64a5eec0fd5ce7c865470ccb49950e48f302d64f3ad54aaadef6b9fca13c9ba54ab9d5d791651562c10aaf0807148b961a73b4ffc6ff20171e8f0bf75ce366b015596f867bb902b285bdc86bca887d81e767e24a9693ab152ad8479409db5d7e0bcad7258e443ed8986f22299a4578b1c081dd956a23393842deab296e54a8484328c86c1a61437fd290b64405227773b6a3d6f4618b1225888e70531450f5d7d3f23d5f26f07faeda438978c2ba9da547ae84a3aa5789b06df7c42b1c048eea2cdc0e4c15cbe8457feac6082cd9d84aec6b65486259be94048a2fb5b6b29840890de3fe75496336594c482bd25cae78476e8870123165182f55e33ff1d31821fb1947ba4477513d3cdd1c6921fdea2fd4d5a3761b68d9789173ffd51883fb84c667484b6166c0f10d9243bae590549140a3e1f19c08d762366d13ae875010ef9e46dfed01ca73e21c5fc23ff8edf2d9d6846316558e56318228e206d3f1114934f7c3d6fd176be0f1b12b44a2b5e27b076a95fc61f0f6e4eb844cfc020ecd965a86a7f8c4a8b06476c104136369d4ea0ec4445ab1ff6e9897eb89860b1e5dce543d25fa915048f66179d0541fe1eb8d5ab66304181cc32fd1b7e0c90f9299ff1807dc7207705fcbe3018219a5d3dd2990daf390af8001f9ff2bc74a0acd7c489f516334e6f6af79381bd09dd48ebb967417749e1f8fc4aa0bb842681db2efd1e89b42baf3d211de5793465d845ecd9db4f79eff545fea20f2aacca6e440923560dd4f89f9a0357403b9accb6c94346b6319734c08e432a5b1320244c607d16d6209b964b515c47c3a473360156511af8bab7507d98725c787c13656825e716cdf464f5e5141c237e6f389ab032ff2eadc983d68608de3c9a31aa8653c093c84bfdb3bd6192036759e6fe8fa93b05e43d2f199b46f7bd53473016c3df1db9de449c45072a48097784de73a2c75545513c5516f0ce73fc86f2805fcdef9e42aba259c3b4d909a6691f952bf0cc7d1c0788dd1ac613a70fd297cc2703c31b90cb8bbc144bfd29a1d0bcd74f25d6bf74e19dd6e6b8b4c1846f9e37c0e4cf00748be59ad0db7952a566ae084a2eb461ddcc0bc3d30a8b118dfda5635e31972a6006e08513e3e2a519a2803d26e92c18adc666bdd791b80e6d06afaf20fefa01a5bcb672463e67f1c6d406aaccee1901e78bf270c1fc543373a1bdd7c05723b702cad0e1c08451eb94b47d7fb065cf7df0048f8ec7c6462e5c73750782f430b85b6bf6ae908483bf9d29c176952696854c9c5ae7bc65ff17959e782b09fa3844d097ef31568cebdcb7c394e182c45418dca9aad422d61ed18cea88bfc157dac30b8762ab7ec2aa846d97fc6725fddc44b705c159523a65c58fdf932f887c028324840ebab8d54845d9c8515a54ecc5d9ab18a4122de93565a195907210b9963277fe818b2a02f6876663a817fa4319edefd0739f48e5cbc7e5d16837d10c0ae259076dd3fa2cb93a1cac07e4b67837e3e8b08d2346ce3971bf870fd4f6fb33a8d272a74fffe993279adaace8bf8a1d6cc02d1b40cb33f7bcfc3b5bcc8ef52040a69341e80736ffe0552e6236d5f57228acab3a03cea7ab44e969e98ae572bb645371c4d4f6e79fe0ad5f1b2e58c495303d205f73c748e9a32e960276cbed74431d6de7683570467ec37e8962ddae9b5007cb706a5c16acff4f0e123b76d57fbeb0ca0ee0be36a8159cbe33740ad4ac83da4e1c960a7cafd332ff679441e22b29cf4ecc6d3c71418152061a52f0e70fadd753e3acd3c7983a07d88c489bf913a5673c2b70dde1b0308ae70206a8f2a5d24af7ebb98bc940ba4794e2fd652067d33697d82de4c15018d82defb9699e5d1b82ffb8f098a8b4a7cb1977b380fe48eb2e6e17a458ce7b30f790150e4cd29e130f6a3b03a2a3668ce2e076e0b2a1be5ee3074a00a2a2cbe8e03ec899f29f35c4cc934b2b22770511889c93b0af92e9ef4939c73f861561c39de8a6db7717dd480b190d1dec540434fc8fa8ae7231294df65ba72dc2413740d05a66ee4a04c9214a18b26e52d277f4dd2ea1b5727dc87e96e95a9a6632724499559b77b7c082e249c5610a89d551e24434fba9f0f5fe681a03c07d2ad3b96a3184066602f3b7af3e8a63b7092b3a2f0bd6d5eee3e67b6bad1dd16156bfbced1ee6c7542317d812a6f2a5e1e41e3e6949a57d33eed273e91e7c87f3d607be50730e9b35a364033d64a8f14f6bf9cc4a5cd3144835a0a01b320a91d898875cbcbbe00cada35d92dc3999768df744a63538e955be79396d9936d69970b06cf91e3a85802db34bd87ddf0540f4312c6edcb16e78f544861b378caaf4e19812ac572348b420f845c57bba31002377ee2826fdc1547ed22752933a364991546445a554e761ae9e3670cf64bdedf730ed6a537b2424809e1bfe2c615f4bd6e7246b002a976ece0e1c46530ac236d0e20b808dc3da085b2ea884e687d4b98a31469a6322badb68eb8cc797125aa2761537e57a74fee53c21b8b435067cd02a07bab8a4e6d80c39bb0c64b1b79b06bad0d4d3cd803922b10fae1b2219de4cadfece4c2514a25827c555b5ec6d9b2bb3b741f0dfc1c4678e8d60b04dcdfb7b19a214404d105c86672b916800f06271eaeeefec90f3d52e5e3b87aa014821bf8678324bce797de6f586a639998df5ed24d50fd1ac1f7b329fb39f56f3b9ca5f3f60c08fe5b1be90eafbb01ad3e96981cd847937fff65fc793e4bda22d893c47a575d501f22bf74099a0bd06f670124715bbcf73255b5d2072b6042736a80cda539d14e0beb53ce4920017f83b9376dc3cdc007b9752c395e0329f9bd977d50de97cc5b18d63d7e054489ee0c2a9afa2fd18b24696cbb4843968a823f72462f6583d6c7d0e81d0e4e56fb5ef889a8709ddddaf29a1a774191c5912ed7793b75065e225a27785a976ba79c98388b4cc757810ab6aefb33a520e36cda3b74ad003149ca2609fe1cc016ad224ece5e12019dd9c9f0bb5ad9ae8c3167f4162a20ebf7acd0482ce3190cf8181d38c310dd486c3c8a41cd664dff84db65847cdd2ba1a86c34c7428e49c7967f04a2</script>
  <div class="hbe hbe-content">
    <div class="hbe hbe-input hbe-input-wave">
      <input class="hbe hbe-input-field hbe-input-field-wave" type="password" id="hbePass">
      <label class="hbe hbe-input-label hbe-input-label-wave" for="hbePass">
        <span class="hbe hbe-input-label-content hbe-input-label-content-wave">坟墓里寂静无比，埋葬你的是所有你没说出口的话</span>
      </label>
      <svg class="hbe hbe-graphic hbe-graphic-wave" width="300%" height="100%" viewBox="0 0 1200 60" preserveAspectRatio="none">
        <path d="M0,56.5c0,0,298.666,0,399.333,0C448.336,56.5,513.994,46,597,46c77.327,0,135,10.5,200.999,10.5c95.996,0,402.001,0,402.001,0"></path>
      </svg>
    </div>
  </div>
</div>
<script data-pjax src="/lib/hbe.js"></script><link href="/css/hbe.style.css" rel="stylesheet" type="text/css">
                                                                    </div>
                                                                    
                                                                        <div class="prev-or-next">
                                                                            <div class="post-foot-next">
                                                                                
                                                                                    <a href="/2022/07/22/Javasec-URL/" target="_self">
                                                                                        <i class="iconfont icon-chevronleft"></i>
                                                                                        <span>Prev</span>
                                                                                    </a>
                                                                                    
                                                                            </div>
                                                                            <div class="post-attach">
                                                                                <!-- <span class="post-pubtime">
              <i class="iconfont icon-updatetime" title="Update time"></i>
              2022-07-25
            </span> -->

                                                                                
                                                                                            <span class="post-categories">
          <!-- <i class="iconfont icon-bookmark" title="Categories"></i> -->
          
          <!-- <span class="span--category">
            <a href="/categories/Life/" title="Life">
              <b>#</b> Life
            </a>
          </span> -->
                                                                                            
                                                                                                </span>
                                                                                                
                                                                                    <span class="post-tags">
          <!-- <i class="iconfont icon-tags" title="Tags"></i> -->
          
          <!-- <span class="span--tag">
            <a href="/tags/Life/" title="Life">
              <b>#</b> Life
            </a>
          </span> -->
                                                                                    
                                                                                        </span>
                                                                                        
                                                                            </div>
                                                                            <div class="post-foot-prev">
                                                                                
                                                                                    <a href="/2022/07/27/RC4/" target="_self">
                                                                                        <span>Next</span>
                                                                                        <i class="iconfont icon-chevronright"></i>
                                                                                    </a>
                                                                                    
                                                                            </div>
                                                                        </div>
                                                                        
                                                                </div>
                                                                
  <div id="btn-catalog" class="btn-catalog">
    <i class="iconfont icon-catalog"></i>
  </div>
  <div class="post-catalog hidden" id="catalog">
    <div class="title">Contents</div>
    <div class="catalog-content">
      
        <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#2022-x2F-7-x2F-21"><span class="toc-text">2022&#x2F;7&#x2F;21</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2022-x2F-7-x2F-22"><span class="toc-text">2022&#x2F;7&#x2F;22</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2022-x2F-7-x2F-23"><span class="toc-text">2022&#x2F;7&#x2F;23</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2022-x2F-7-x2F-24"><span class="toc-text">2022&#x2F;7&#x2F;24</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2022-x2F-7-x2F-25"><span class="toc-text">2022&#x2F;7&#x2F;25</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2022-x2F-7-x2F-26"><span class="toc-text">2022&#x2F;7&#x2F;26</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2022-x2F-7-x2F-27"><span class="toc-text">2022&#x2F;7&#x2F;27</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2022-x2F-7-x2F-29"><span class="toc-text">2022&#x2F;7&#x2F;29</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2022-x2F-7-x2F-30"><span class="toc-text">2022&#x2F;7&#x2F;30</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2020-x2F-8-x2F-1"><span class="toc-text">2020&#x2F;8&#x2F;1</span></a></li></ol>
      
    </div>
  </div>

  
<script src="/js/catalog.js"></script>




                                                                    
                                                                        <div class="comments-container">
                                                                            







                                                                        </div>
                                                                        
                                                            </div>
                                                            
        
<div class="footer">
  <div class="social">
    <ul>
      
        <li>
          <a title="github" target="_blank" rel="noopener" href="https://github.com/Ghostasky">
            <i class="iconfont icon-github"></i>
          </a>
        </li>
      
        <li>
          <a title="twitter" target="_blank" rel="noopener" href="https://twitter.com/ghostasky">
            <i class="iconfont icon-twitter"></i>
          </a>
        </li>
      
    </ul>
  </div>
  
    
    <div class="footer-more">
      
        <a target="_blank" rel="noopener" href="https://github.com/Ghostasky">怕什么真理无穷，进一寸有进一寸的欢喜。</a>
        
    </div>
  
    
    <div class="footer-more">
      
        <a target="_blank" rel="noopener" href="https://github.com/zchengsite/hexo-theme-oranges">Copyright © 2022 Oranges</a>
        
    </div>
  
    
    <div class="footer-more">
      
        <a target="_blank" rel="noopener" href="https://github.com/zchengsite/hexo-theme-oranges">Theme by Oranges | Powered by Hexo</a>
        
    </div>
  
</div>

      </div>

      <div class="tools-bar">
        <div class="back-to-top tools-bar-item hidden">
  <a href="javascript: void(0)">
    <i class="iconfont icon-chevronup"></i>
  </a>
</div>


<script src="/js/backtotop.js"></script>



        
  <div class="search-icon tools-bar-item" id="search-icon">
    <a href="javascript: void(0)">
      <i class="iconfont icon-search"></i>
    </a>
  </div>

  <div class="search-overlay hidden">
    <div class="search-content" tabindex="0">
      <div class="search-title">
        <span class="search-icon-input">
          <a href="javascript: void(0)">
            <i class="iconfont icon-search"></i>
          </a>
        </span>
        
          <input type="text" class="search-input" id="search-input" placeholder="Search...">
        
        <span class="search-close-icon" id="search-close-icon">
          <a href="javascript: void(0)">
            <i class="iconfont icon-close"></i>
          </a>
        </span>
      </div>
      <div class="search-result" id="search-result"></div>
    </div>
  </div>

  <script type="text/javascript">
    var inputArea = document.querySelector("#search-input")
    var searchOverlayArea = document.querySelector(".search-overlay")

    inputArea.onclick = function() {
      getSearchFile()
      this.onclick = null
    }

    inputArea.onkeydown = function() {
      if(event.keyCode == 13)
        return false
    }

    function openOrHideSearchContent() {
      let isHidden = searchOverlayArea.classList.contains('hidden')
      if (isHidden) {
        searchOverlayArea.classList.remove('hidden')
        document.body.classList.add('hidden')
        // inputArea.focus()
      } else {
        searchOverlayArea.classList.add('hidden')
        document.body.classList.remove('hidden')
      }
    }

    function blurSearchContent(e) {
      if (e.target === searchOverlayArea) {
        openOrHideSearchContent()
      }
    }

    document.querySelector("#search-icon").addEventListener("click", openOrHideSearchContent, false)
    document.querySelector("#search-close-icon").addEventListener("click", openOrHideSearchContent, false)
    searchOverlayArea.addEventListener("click", blurSearchContent, false)

    var searchFunc = function (path, search_id, content_id) {
      'use strict';
      var $input = document.getElementById(search_id);
      var $resultContent = document.getElementById(content_id);
      $resultContent.innerHTML = "<ul><span class='local-search-empty'>First search, index file loading, please wait...<span></ul>";
      $.ajax({
        // 0x01. load xml file
        url: path,
        dataType: "xml",
        success: function (xmlResponse) {
          // 0x02. parse xml file
          var datas = $("entry", xmlResponse).map(function () {
            return {
              title: $("title", this).text(),
              content: $("content", this).text(),
              url: $("url", this).text()
            };
          }).get();
          $resultContent.innerHTML = "";

          $input.addEventListener('input', function () {
            // 0x03. parse query to keywords list
            var str = '<ul class=\"search-result-list\">';
            var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
            $resultContent.innerHTML = "";
            if (this.value.trim().length <= 0) {
              return;
            }
            // 0x04. perform local searching
            datas.forEach(function (data) {
              var isMatch = true;
              var content_index = [];
              if (!data.title || data.title.trim() === '') {
                data.title = "Untitled";
              }
              var orig_data_title = data.title.trim();
              var data_title = orig_data_title.toLowerCase();
              var orig_data_content = data.content.trim().replace(/<[^>]+>/g, "");
              var data_content = orig_data_content.toLowerCase();
              var data_url = data.url;
              var index_title = -1;
              var index_content = -1;
              var first_occur = -1;
              // only match artiles with not empty contents
              if (data_content !== '') {
                keywords.forEach(function (keyword, i) {
                  index_title = data_title.indexOf(keyword);
                  index_content = data_content.indexOf(keyword);

                  if (index_title < 0 && index_content < 0) {
                    isMatch = false;
                  } else {
                    if (index_content < 0) {
                      index_content = 0;
                    }
                    if (i == 0) {
                      first_occur = index_content;
                    }
                    // content_index.push({index_content:index_content, keyword_len:keyword_len});
                  }
                });
              } else {
                isMatch = false;
              }
              // 0x05. show search results
              if (isMatch) {
                str += "<li><a href='" + data_url + "' class='search-result-title'>" + orig_data_title + "</a>";
                var content = orig_data_content;
                if (first_occur >= 0) {
                  // cut out 100 characters
                  var start = first_occur - 20;
                  var end = first_occur + 80;

                  if (start < 0) {
                    start = 0;
                  }

                  if (start == 0) {
                    end = 100;
                  }

                  if (end > content.length) {
                    end = content.length;
                  }

                  var match_content = content.substr(start, end);

                  // highlight all keywords
                  keywords.forEach(function (keyword) {
                    var regS = new RegExp(keyword, "gi");
                    match_content = match_content.replace(regS, "<span class=\"search-keyword\">" + keyword + "</span>");
                  });

                  str += "<p class=\"search-result-abstract\">" + match_content + "...</p>"
                }
                str += "</li>";
              }
            });
            str += "</ul>";
            if (str.indexOf('<li>') === -1) {
              return $resultContent.innerHTML = "<ul><span class='local-search-empty'>No result<span></ul>";
            }
            $resultContent.innerHTML = str;
          });
        },
        error: function(xhr, status, error) {
          $resultContent.innerHTML = ""
          if (xhr.status === 404) {
            $resultContent.innerHTML = "<ul><span class='local-search-empty'>The search.xml file was not found, please refer to：<a href='https://github.com/zchengsite/hexo-theme-oranges#configuration' target='_black'>configuration</a><span></ul>";
          } else {
            $resultContent.innerHTML = "<ul><span class='local-search-empty'>The request failed, Try to refresh the page or try again later.<span></ul>";
          }
        }
      });
      $(document).on('click', '#search-close-icon', function() {
        $('#search-input').val('');
        $('#search-result').html('');
      });
    }

    var getSearchFile = function() {
        var path = "/search.xml";
        searchFunc(path, 'search-input', 'search-result');
    }
  </script>




        
  <div class="tools-bar-item theme-icon" id="switch-color-scheme">
    <a href="javascript: void(0)">
      <i id="theme-icon" class="iconfont icon-moon"></i>
    </a>
  </div>

  
<script src="/js/colorscheme.js"></script>





        
  
    <div class="share-icon tools-bar-item">
      <a href="javascript: void(0)" id="share-icon">
        <i class="iconfont iconshare"></i>
      </a>
      <div class="share-content hidden">
        
          <a class="share-item" href="https://twitter.com/intent/tweet?text=' + HW%E6%97%A5%E8%AE%B0 + '&url=' + https%3A%2F%2Fghostasky.github.io%2F2022%2F07%2F25%2F2022-hw%2F + '" target="_blank" title="Twitter">
            <i class="iconfont icon-twitter"></i>
          </a>
        
        
          <a class="share-item" href="https://www.facebook.com/sharer.php?u=https://ghostasky.github.io/2022/07/25/2022-hw/" target="_blank" title="Facebook">
            <i class="iconfont icon-facebooksquare"></i>
          </a>
        
      </div>
    </div>
  
  
<script src="/js/shares.js"></script>



      </div>
    </div>
  </body>
</html>
